//
//  DictionaryManager.h
//  LineByLine
//
//  Created by 병철 김 on 11. 12. 16..
//  Copyright (c) 2011 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "HttpRequest.h"

@protocol DictionaryManagerDelegate <NSObject>
- (void) didFinishDictionarySeachingWord:(NSString*)word meaning:(NSString*)meaning;
@end

@class DictionaryManagerDao;
@interface DictionaryManager : NSObject {
    id<DictionaryManagerDelegate> delegate;
    DictionaryManagerDao *dao;
}

+ (DictionaryManager*) sharedDictionaryManager;
- (void)simpleMeaning:(NSString*)word;
- (void) cancelSearching;

@property (retain, nonatomic) DictionaryManagerDao *dao;
@property (assign, nonatomic) id<DictionaryManagerDelegate> delegate;
@end


#pragma mark - local & proxy
@class DictionaryManagerDaoServer;
@interface DictionaryManagerDao : NSObject {
    DictionaryManagerDaoServer *serverDao;
    id<DictionaryManagerDelegate> delegate;
}

- (void)simpleMeaning:(NSString*)word;
- (void) cancelSearching;

@property (retain, nonatomic) DictionaryManagerDaoServer *serverDao;
@property (assign, nonatomic) id<DictionaryManagerDelegate> delegate;
@end

#pragma mark - server
@interface DictionaryManagerDaoServer : DictionaryManagerDao {
    HttpRequest *httpRequset;
}
@end

